/****** Object:  Table [dbo].[flight]    ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[flight](
	[flightName] [nchar](10) NOT NULL,
	[aircraftId] [int] NULL,
 CONSTRAINT [PK_flight] PRIMARY KEY CLUSTERED 
(
	[flightName] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

ALTER TABLE [dbo].[flight]  WITH CHECK ADD  CONSTRAINT [FK_flight_aircraft] FOREIGN KEY([aircraftId])
REFERENCES [dbo].[aircraft] ([aircraftId])
GO

ALTER TABLE [dbo].[flight] CHECK CONSTRAINT [FK_flight_aircraft]
GO

